﻿using Domain.Roles.Entities;

namespace Application.Roles.Interfaces.Repositories
{
    public interface IRoleRepository
    {
        /// <summary>
        /// 通过id查找对应的角色
        /// </summary>
        /// <param name="id"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<Role> GetByIdsAsync(Guid ids, CancellationToken cancellationToken = default);

        /// <summary>
        /// 添加角色
        /// </summary>
        /// <param name="role"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task AddAsync(Role role, CancellationToken cancellationToken = default);

        /// <summary>
        /// 更新角色
        /// </summary>
        /// <param name="role"></param>
        void Update(Role role, CancellationToken cancellationToken = default);
    }
}
